package squares;
/**
 * An exception class that is thrown when when an invalid square is given and has value null
 * 
 * @version 1.0
 * @author 	Gilles Groven & Jochen Tombal
 */

public class IllegalSquareException extends Exception
{
	/**
	 *  A version number for classes that implement the interface
	 * 	Serializable wich is strongly recommends by Java API
	 */
	private static final long serialVersionUID = 2308055789345317682L;
	/**
	 *  The error message that is to be returned, expressed as a string.
	 *  This message gives the user more information about origin of the error.
	 */
	private final String message;
	/**
	 * this new Illegal square Exception with the given string as an error message for the user
	 *	
	 * @param 	message
	 * 			The text message of this new Illegal square Exception that is to be returned
	 * @effect	The exception is invoked when an invalid square is given and has value null
	 */
	public IllegalSquareException(String message)
	{
		this.message = message;
	}
	/**
	 * @return	returns the text message of this new Illegal square Exception that
	 * 			is to be returned to the user
	 */
	public String getSquare()
	{
		return message;
	}
}
